//
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/vinniefalco/CppCon2018
//

//------------------------------------------------------------------------------
/*
    WebSocket chat server, multi-threaded

    This implements a multi-user chat room using WebSocket. The
    `io_context` runs on any number of threads, specified at
    the command line.

*/
//------------------------------------------------------------------------------

#include <chrono>
#include <iostream>
#include "NetContextPool.hpp"

void test()
{
    std::cout << "this is a test "<< std::endl;
}

int main(int argc, char* argv[])
{

	TWT::NETWORK::NetContextPool netContextPool(2);

    netContextPool.getIoContext().post(test);

    std::cout << "begin to exit " << std::endl;
    std::this_thread::sleep_for(std::chrono::seconds(10));
    return EXIT_SUCCESS;
}
